<template>
    <div class="songmore-content">
      <div
        class="songmore-item"
        v-for="item of songmore"
        :key="item.id"
        @click="handleDetail(item.id)"
      >
        <div class="img"><img v-lazy="item.coverImgUrl" alt="" /></div>
        <p>{{ item.name }}</p>
      </div>
    </div>
</template>

<script>
// import Item from "../components/Item.vue"
export default {
  data() {
    return {
      songmore: [],
    };
  },
  mounted() {
    this.$http.get(`/top/playlist/?cat=欧美`).then((res) => {
      console.log(res);
      this.songmore = res.data.playlists;
    });
  },
  methods: {
    handleDetail(val) {
      this.$router.push(`/songdetail?id=${val}`);
    },
  },
};
</script>

<style scoped>
.songmore {
  width: 1200px;
  margin: 0 auto;
  margin-top: 30px;
}
.title {
  line-height: 30px;
  border-bottom: 3px solid #9bb1ff;
}
.songmore-content {
  padding: 20px 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.songmore-item {
  margin-top: 30px;
  width: 250px;
  height: 300px;
}
.img {
  border-radius: 20px;
  width: 250px;
  height: 250px;
  overflow: hidden;
}
.songmore-item img {
  border-radius: 20px;
  width: 250px;
  height: 250px;
  transition: all 1s;
}
.songmore-item img:hover{
  transform: scale(1.2);
}
.songmore-item p {
  margin-top: 20px;
}
</style>